package cn.java.basic;

public class ParamDemo
{
    public static int add(int a,int b)
    {
        int z=a+b;
        a++;
        b++;
        return z;
    }

    public static StringBuilder add(StringBuilder s1,StringBuilder s2)
    {
        StringBuilder s3=s1.append(s2);
        //s1.replace(0,s1.length(),"请");
        //s2.replace(0,s2.length(),"扫描二维码");
        return s3;
    }

    public static void main(String[] args)
    {
        int x=10,y=20;
        System.out.println("x+y="+(add(x,y)));
        System.out.println("x="+x+",y="+y);

        StringBuilder strMsg1=new StringBuilder("call");
        StringBuilder strMsg2=new StringBuilder(" my name");
        System.out.println("strMsg1+strMsg2="+(add(strMsg1,strMsg2)));
        System.out.println("strMsg1="+strMsg1+",strMsg2="+strMsg2);

    }
}
